package Chapter08.poly_;

/**
 * @author 杨森
 * @date 2022年09月28日 20:41
 */
public class Test {
    public static void main(String[] args) {
        Employee e = new Employee();
        Staff staff = new Staff("tom", 2500.0);
        Manager manager = new Manager("milan", 5000.0,200000);
        Test test = new Test();
        test.showEmpAnnual(staff);
        test.showEmpAnnual(manager);

        test.testWorkd(staff);
        test.testWorkd(manager);

        int i=65;
        float f=65.0f;
        char c='A';
        char c1=12;
        System.out.println(i==c);
        System.out.println(c1==12);
        System.out.println(i==f);
    }
    public void  showEmpAnnual(Employee e) {
        System.out.println(e.getAnnualge());
    }

    public void testWorkd(Employee e){
        if (e instanceof Staff){
            ((Staff) e).staff();
        }else if (e instanceof Manager){
            ((Manager) e).manager();
        }
    }
}
